﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;
namespace ForceSynch
{
    public class Devices
    {
        [XmlArray]
        public Device[] DevicesList;
        public void Add(Device dev)
        {
            List<Device> list = DevicesList.ToList<Device>();
            list.Add(dev);
            DevicesList = list.ToArray<Device>();
        }
    }

    public class Device
    {
        private string _driveID;
        private string _driveDirectory;
        private string _hddDirectory;
        [XmlAttribute]
        public string HddDirectory
        {
            get { return _hddDirectory; }
            set { _hddDirectory = value; }
        }
        [XmlAttribute]
        public string DriveID
        {
            get { return _driveID; }
            set { _driveID = value; }
        }
        [XmlAttribute]
        public string DriveDirectory
        {
            get
            {
                return _driveDirectory;
            }
            set
            {
                _driveDirectory = value;
            }
        }
        public Device()
        {
        }
        
        public Device(string DeviceID, string Directory,string hddDirectory)
        {
            this._driveDirectory = Directory;
            this._driveID = DeviceID;
            this._hddDirectory = hddDirectory;
        }
        
    }
}
